
const mongoose = require("mongoose");
// 定义一个模式
var Schema = mongoose.Schema;

const NewsModelSchema = new Schema({
  title: String,
  content: String,
  category: Number,
  coverPicture: String,
  isPublish: Number,
  editTime:Date
});
// 使用模式“编译”模型
const NewsModel = mongoose.model("news", NewsModelSchema);
module.exports=NewsModel